﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace lgweb.control
{
    public partial class pager : System.Web.UI.UserControl
    {
        private int pageSize = 20;
        private int recordCount = 1;
        private int pageIndex = 1;
        private int totalPage = 1;
        private string linkUrl = "";
        private string isnext = "1";
        private string floatpt = "left";
        private bool _isResult = true;
        private bool _isAddPageIndex = true;


        /// <summary>
        /// 是否显示下一页样式
        /// </summary>
        public string IsNext
        {
            set { isnext = value; }
        }
        /// <summary>
        /// 浮左或者浮右
        /// </summary>
        public string FloatPt
        {
            set { floatpt = value; }
        }
        /// <summary>
        /// 每页显示记录数
        /// </summary>
        public int PageSize
        {
            set { pageSize = Convert.ToInt32(value); }
        }

        /// <summary>
        /// 总记录数
        /// </summary>
        public int RecordCount
        {
            set { recordCount = Convert.ToInt32(value); }
        }
        /// <summary>
        /// 当前页
        /// </summary>
        public int PageIndex
        {
            set { pageIndex = Convert.ToInt32(value); }
        }

        /// <summary>
        /// 总页数
        /// </summary>
        public int TotalPage
        {
            set { totalPage = Convert.ToInt32(value); }
        }

        /// <summary>
        /// 是否显示分页信息
        /// </summary>
        public bool IsResult
        {
            set { _isResult = value; }
        }

        /// <summary>
        /// 链接地址
        /// </summary>
        public string LinkUrl
        {
            set { linkUrl = value; }
        }

        /// <summary>
        /// 是否添加PageIndex参数：true-添加 false-不添加
        /// </summary>
        public bool IsAddPageIndex
        {
            set { _isAddPageIndex = value; }
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}